deploy: Remove deployment bootcsum assertion
authorColin Walters <walters@verbum.org>
Thu, 24 Sep 2020 19:28:31 +0000 (19:28 +0000)
committerColin Walters <walters@verbum.org>
Thu, 24 Sep 2020 21:24:48 +0000 (21:24 +0000)
commitaa2a2783ea71d956db41f0f874d596752e47449f
tree377701e3585f2abf4bab6066024576c327b85ef7
parent6950a98099927d0d2b52719fbfb4fe73842400aa
deploy: Remove deployment bootcsum assertion

When support for devicetree was added, it created a problem
because old and new ostree versions would compute different
checksums for the "boot data".  The scenario here is:

- Have system with ostree < 2020.4
- Reboot into system with ostree 2020.5
- Try to perform an operation that would retain
  that previous booted deployment (common)

Currently ostree iterates over all the deployments
that will be retained and calls `install_deployment_kernel()`,
even for the booted one (which is a bit silly), but
just to verify that all boot data for the targeted
deployments are installed.

This then re-computes the checksum and we'd trip this
assertion.

In practice though, we don't strictly require them to match;
the only thing that will happen if they don't is that we'll
end up with another copy of the kernel/initramfs - and
that only temporarily until the previous deployment
gets GC'd.

Longer term, I think what we really want to do anyways
is probably closer to like a little ostree repo for `/boot`
so that we can e.g. still hardlink kernels there even if
the initramfs changes, or hardlink both kernel/initramfs
if just the devicetree changes, etc.

Closes: https://github.com/ostreedev/ostree/issues/2154
Makefile-tests.am
src/libostree/ostree-sysroot-deploy.c
src/libostree/ostree-sysroot-private.h
src/libostree/ostree-sysroot.c
tests/test-osupdate-dtb.sh [new file with mode: 0755]